1. Field of the Invention
The present invention relates in general to computer networks and more particularly to a parallel data transfer method and system for managing the transfer of data in parallel through multiple sockets.
2. Related Art
Computer networks are widespread and vitally important to many types of enterprises including businesses, universities and government. In general, a computer network is two or more computers (or associated devices) that are connected by communication facilities. One type of computer network is a client/server network. A client/server network includes a server, which is a computer or a process that provides shared resources to users of the network, and a client, which is a computer or a process that accesses the shared network resources provided by the server using the communication facilities.
In general, a client in a client/server network obtains information from a server by sending a request to the server. When the server receives the request, a server application on the server fills the request by obtaining the requested information and sending the information through the network to the client. The Internet (via the World Wide Web (WWW)) is an example of a client/server network. The Internet is a public wide-area network (WAN) environment that enables a client to request and receive data located on a remote server.
The server computer includes a network adapter card that physically transmits and receives packets of data between the server computer and a client computer over the network. The server computer also includes server applications that are software for manipulating data. For example, server applications may include database programs, spreadsheets and browsers. Each server application can access the network through the network adapter card. The network adapter card is only a single physical connection between the server computer and the network, but can support multiple virtual connections between the multiple server applications and the card.
Each virtual connection between a server application and the network adapter may be divided into three elements. A virtual port is at the network adapter card side of the virtual connection. The network adapter card normally can support multiple virtual ports. An application process (also called a “thread”) is on the other side of the virtual connection. When the application is a server application, the application process is called a server process. The thread can be processed by a processor on the server computer. Each server application may be running several threads, and multiple threads may be processed by the processor simultaneously.
A socket is used to connect a thread to a virtual port. A socket is a software object that allows a thread of a server application to communicate with a virtual port of the network adapter card. The procedure of creating a socket between a thread of a server application and a virtual port of the network adapter card is known as “binding” the server application to the socket. When a server application is “bound” to a socket, a connection is made between a thread of the server application and a virtual port of the network adapter card. When this connection is established, the server application is able to communicate with the network adapter card and receive and transmit data over the network.
Current socket techniques create a socket and bind a server application to the socket each time a client makes a request to the server. The server application stays bound to the socket from the time the client request is received to the time the server application sends a response to the client. In other words, a single server application monopolizes the socket until the client request is fulfilled. The server receives a client request, determines to which server application the client request is directed, creates a socket, bind the server application to the socket, processes the data and send the data to the client to fulfill the client request. All during this time the server application stays connected to the socket until the client request is fulfilled.
One problem with these current socket techniques is that multiple server applications are contending for the single socket. While a single server application monopolizes a socket other server applications are unable to access the network adapter card. This becomes a major bottleneck that can cause a reduction in network performance.
Some current socket techniques attempt to avoid this problem by allowing two sockets to be used. In this socket pair technique, one server application is bound to one socket and another server application is bound to the other socket such that a socket pair is formed. The socket pair technique uses a socket assignment procedure to determine which server application is assigned to which socket.
One problem with the socket pair technique is that the socket assignment procedure is will assign a socket even if the socket is in use and unavailable. This will cause socket contention and force a server application to wait for the socket to become available. For example, the socket assignment procedure in the socket pair technique will assign the first socket of the socket pair. If this first socket is being used already by a server application, then the procedure will keep trying to acquire the socket. After several attempts the procedure may assign the second socket. However, valuable time is wasted and efficiency decreased because current socket assignment procedures always assign the first socket, even if that socket is not available. Thus, current socket pair techniques do little to alleviate socket contention and bottlenecks and to increase efficiency.
Therefore, what is needed is a method and system for managing the transfer of data using a socket that avoids monopolization of the socket by a single server application. What is also needed is a method and system for managing data the transfer of data through multiple sockets that assigns sockets such that server applications are assigned only to available sockets. What also is needed is a method and system for managing the transfer of data through multiple sockets that provides multiple socket binding and assignment within the framework of existing operating systems.